<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var x = [{id:1,name:"供应商管理"},{id:2,name:"采购入库"},{id:3,name:"采购信息"}];
        var index = x.findIndex((n)=>n.name=="采购信息e");
        alert(index)
    </script>
</head>
<body>

</body>
</html>